[][src]Crate druid_shell

Platform abstraction for druid toolkit.

druid-shell is an abstraction around a given platform UI & application framework. It provides common types, which then defer to a platform-defined implementation.

Env

For testing and debugging, druid-shell can change its behavior based on environment variables. Here is a list of environment variables that druid-shell supports:

  • DRUID_SHELL_DISABLE_X11_PRESENT: if this is set and druid-shell is using the x11 backend, it will avoid using the Present extension.

Re-exports

pub use kurbo;
pub use piet_common as piet;
pub use keyboard_types;

Macros

accel

Convenience macro for defining accelerator tables.

Structs

Application

The top level application object.

Clipboard

A handle to the system clipboard.

ClipboardFormat

Data coupled with a type identifier.

Counter

An incrementing counter for generating unique ids.

CursorDesc

A platform-independent description of a custom cursor.

FileDialogOptions

Options for file dialogs.

FileDialogToken

A token that uniquely identifies a file dialog request.

FileInfo

Information about the path to be opened or saved.

FileSpec

A description of a filetype, for specifiying allowed types in a file dialog.

HotKey

A description of a keyboard shortcut.

IdleHandle

A handle that can enqueue tasks on the window loop.

IdleToken

A token that uniquely identifies a idle schedule.

KeyEvent

Information about a keyboard event.

Menu

A menu object.

Modifiers

The modifiers.

Monitor

Monitor struct containing data about a monitor on the system

MouseButtons

A set of MouseButtons.

MouseEvent

Information about the mouse event.

Region

A union of rectangles, useful for describing an area that needs to be repainted.

Scale

Coordinate scaling between pixels and display points.

ScaledArea

A specific area scaling state.

Screen

Information about the screen and monitors

TimerToken

A token that uniquely identifies a running timer.

WindowBuilder

A builder type for creating new windows.

WindowHandle

A handle to a platform window object.

Enums

Code

Code is the physical position of a key.

Cursor

Mouse cursors.

Error

Shell errors.

KeyState

Describes the state the key is in.

Location

The location attribute contains an indication of the logical location of the key on the device.

MouseButton

An indicator of which mouse button was pressed.

RawMods

A representation of the active modifier keys.

SysMods

A platform-agnostic representation of keyboard modifiers, for command handling.

WindowLevel

Levels in the window system - Z order for display purposes. Describes the purpose of a window and should be mapped appropriately to match platform conventions.

WindowState

Contains the different states a Window can be in.

Traits

AppHandler

A top-level handler that is not associated with any window.

IntoKey

A convenience trait for creating Key objects.

Scalable

The Scalable trait describes how coordinates should be translated from display points into pixels and vice versa using a Scale.

WinHandler

App behavior, supplied by the app.

Type Definitions

FormatId

A type identifer for the system clipboard.

KbKey

The meaning (mapped value) of a keypress.